import request from '@/utils/request'

/**
 * 获取人员+项目信息
 * @returns
 */
export const getPeopleInfo = () =>
  request<any, UserInfoResponse>({
    url: '/admin/peopleinfo',
    method: 'GET',
  })

/**
 * 添加人员+项目信息
 * @returns
 */
export const addPeopleInfo = (people: any) =>
  request<any, UserInfoResponse>({
    url: '/admin/peopleinfo',
    method: 'POST',
    data: people,
  })
/**
 * 修改人员+项目信息
 * @returns
 */
export const setPeopleInfo = (people: any) =>
  request<any, UserInfoResponse>({
    url: '/admin/peopleinfo',
    method: 'PUT',
    data: people,
  })
/**
 * 删除人员+项目信息
 * @returns
 */
export const deletePeopleInfo = (people: any) =>
  request<any, UserInfoResponse>({
    url: '/admin/peopleinfo',
    method: 'DELETE',
    data: people,
  })

/**
 * 批量人员+项目删除
 * @returns
 */
export const dletePeopleAll = (people: any) =>
  request<any, UserInfoResponse>({
    url: '/admin/dletepeopleall',
    method: 'DELETE',
    data: people,
  })

/**********************************************************************/

/**
 * 获取材料+公司+仓库信息
 * @returns
 */
export const getMaterialInfo = () =>
  request<any, UserInfoResponse>({
    url: '/admin/materialinfo',
    method: 'GET',
  })

/**
 * 添加材料+公司+仓库信息
 * @returns
 */
export const addMaterialInfo = (params: any) =>
  request<any, UserInfoResponse>({
    url: '/admin/materialinfo',
    method: 'POST',
    data: params,
  })

/**
 * 修改材料+公司+仓库信息
 * @returns
 */
export const setMaterialInfo = (params: any) =>
  request<any, UserInfoResponse>({
    url: '/admin/materialinfo',
    method: 'PUT',
    data: params,
  })

/**
 * 删除材料+公司+仓库信息
 * @returns
 */
export const deleteMaterialInfo = (params: any) =>
  request<any, UserInfoResponse>({
    url: '/admin/materialinfo',
    method: 'DELETE',
    data: params,
  })

/**
 * 批量材料+公司+仓库删除
 * @returns
 */
export const dletematerialall = (params: any) =>
  request<any, UserInfoResponse>({
    url: '/admin/dletematerialall',
    method: 'DELETE',
    data: params,
  })
/**********************************************************************/

/**
 * 获取流程信息
 * @returns
 */
export const getOfficeInfo = () =>
  request<any, UserInfoResponse>({
    url: '/admin/officeinfo',
    method: 'GET',
  })

/**
 * 添加流程信息
 * @returns
 */
export const addOfficeInfo = (params: any) =>
  request<any, UserInfoResponse>({
    url: '/admin/officeinfo',
    method: 'POST',
    data: params,
  })

/**
 * 修改流程信息
 * @returns
 */
export const setOfficeInfo = (params: any) =>
  request<any, UserInfoResponse>({
    url: '/admin/officeinfo',
    method: 'PUT',
    data: params,
  })

/**
 * 删除流程信息
 * @returns
 */
export const deleteOfficeInfo = (params: any) =>
  request<any, UserInfoResponse>({
    url: '/admin/officeinfo',
    method: 'DELETE',
    data: params,
  })

/**
 * 批量流程删除
 * @returns
 */
export const dleteOfficeall = (params: any) =>
  request<any, UserInfoResponse>({
    url: '/admin/dleteofficeall',
    method: 'DELETE',
    data: params,
  })

/**********************************************************************/

/**
 * 获取邮件信息
 * @returns
 */
export const getMailInfo = () =>
  request<any, UserInfoResponse>({
    url: '/admin/mailinfo',
    method: 'GET',
  })

/**
 * 添加邮件信息
 * @returns
 */
export const addMailInfo = (params: any) =>
  request<any, UserInfoResponse>({
    url: '/admin/mailinfo',
    method: 'POST',
    data: params,
  })

/**
 * 修改邮件信息
 * @returns
 */
export const setMailInfo = (params: any) =>
  request<any, UserInfoResponse>({
    url: '/admin/mailinfo',
    method: 'PUT',
    data: params,
  })

/**
 * 删除邮件信息
 * @returns
 */
export const deleteMailInfo = (params: any) =>
  request<any, UserInfoResponse>({
    url: '/admin/mailinfo',
    method: 'DELETE',
    data: params,
  })

/**
 * 批量邮件删除
 * @returns
 */
export const dleteMailall = (params: any) =>
  request<any, UserInfoResponse>({
    url: '/admin/dletemailall',
    method: 'DELETE',
    data: params,
  })

/**********************************************************************/

/**
 * 获取计划信息
 * @returns
 */
export const getPlanInfo = () =>
  request<any, UserInfoResponse>({
    url: '/admin/planinfo',
    method: 'GET',
  })

/**
 * 添加计划信息
 * @returns
 */
export const addPlanInfo = (params: any) =>
  request<any, UserInfoResponse>({
    url: '/admin/planinfo',
    method: 'POST',
    data: params,
  })

/**
 * 修改计划信息
 * @returns
 */
export const setPlanInfo = (params: any) =>
  request<any, UserInfoResponse>({
    url: '/admin/planinfo',
    method: 'PUT',
    data: params,
  })

/**
 * 删除计划信息
 * @returns
 */
export const deletePlanInfo = (params: any) =>
  request<any, UserInfoResponse>({
    url: '/admin/planinfo',
    method: 'DELETE',
    data: params,
  })

/**
 * 批量计划删除
 * @returns
 */
export const dletePlanall = (params: any) =>
  request<any, UserInfoResponse>({
    url: '/admin/dleteplanall',
    method: 'DELETE',
    data: params,
  })

/**********************************************************************/

/**
 * 获取日程信息
 * @returns
 */
export const getScheduleInfo = () =>
  request<any, UserInfoResponse>({
    url: '/admin/scheduleinfo',
    method: 'GET',
  })

/**
 * 添加日程信息
 * @returns
 */
export const addScheduleInfo = (params: any) =>
  request<any, UserInfoResponse>({
    url: '/admin/scheduleinfo',
    method: 'POST',
    data: params,
  })

/**
 * 修改日程信息
 * @returns
 */
export const setScheduleInfo = (params: any) =>
  request<any, UserInfoResponse>({
    url: '/admin/scheduleinfo',
    method: 'PUT',
    data: params,
  })

/**
 * 删除日程信息
 * @returns
 */
export const deleteScheduleInfo = (params: any) =>
  request<any, UserInfoResponse>({
    url: '/admin/scheduleinfo',
    method: 'DELETE',
    data: params,
  })

/**
 * 批量日程删除
 * @returns
 */
export const dleteScheduleall = (params: any) =>
  request<any, UserInfoResponse>({
    url: '/admin/dletescheduleall',
    method: 'DELETE',
    data: params,
  })
